package com.fancy.learncenter.ui.adapter;

import android.content.Context;
import android.widget.TextView;

import com.facebook.drawee.view.SimpleDraweeView;
import com.fancy.learncenter.R;
import com.fancy.learncenter.bean.DiscussDataBean;
import com.fancy.learncenter.ui.adapter.base.CommonRecycleViewAdapter;
import com.fancy.learncenter.ui.adapter.base.CustomViewHold;

import java.util.List;

/**
 * Created by Hyy on 2016/12/30.
 */

public class FragmentPlayAuidoDiscussAdapter extends CommonRecycleViewAdapter<DiscussDataBean.CommentsVOListBean> {
    public FragmentPlayAuidoDiscussAdapter(Context mContext, List<DiscussDataBean.CommentsVOListBean> itemDatas) {
        super(mContext, R.layout.actvity_play_audio_discuss_item, itemDatas);
    }

    @Override
    public void bindView(CustomViewHold customViewHold, DiscussDataBean.CommentsVOListBean item, int position) {
        SimpleDraweeView headerIcon = customViewHold.getView(R.id.headerIcon);
        headerIcon.setImageURI(item.getImgUrl());

        TextView name = customViewHold.getView(R.id.name);
        name.setText(item.getNickName());

        TextView content = customViewHold.getView(R.id.content);
        content.setText(item.getContent());
    }
}
